<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="cn.netjava.pojo.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>文章页面</title>
    <script type="text/javascript" src="fckeditor/fckeditor.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/showonearticle.css">
	
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
     <div id="container">
       <div id="front">
           <jsp:include page="personfront.jsp" />          
       </div>
       
       <div id="main">
           <div id="left">
               <% Article article=(Article)request.getAttribute("oneArticle"); %>
              <div id="article">
	               <div id="article_title"><%=article.getArticle_title() %>
	               </div>
	                               
	               <hr>                         
	               <div id="article_content">  
	                <%=article.getArtical_content() %>                                   
	               </div>
               </div>
               
               <%List<Review> reviewList = (List<Review>)request.getAttribute("reviews"); %>
               <div id="review">
                   <div class="review_title">评论
                   </div>
                   
                   <div class="review_content">
                     <%if(null!=reviewList){
                      for(Review review:reviewList){ %>
                      <div class="content">
                         <%=review.getReviewContent() %>
                      </div>
                      <div class ="author">
                         <ul>
                           <li>评论日期:<%=review.getIns_dt() %></li>
                           <li>作者:<%=review.getUser().getUserName() %></li>                         
                         </ul>
                      </div>
                      <br>                     
                      <%}} %>
                   </div>
                   
                   <div class="review_title">写评论
                   </div>
                   <div class="review_content">
                      <form action="writereview.cn" method="POST">
                        <script type="text/javascript">
						     //新建一个FCK实例
						     var oFCKeditor = new FCKeditor('REVIEW');
						     //设计编辑器的文件的路径
						     oFCKeditor.BasePath = "/blog/fckeditor/";
						     oFCKeditor.Width="770";
						     oFCKeditor.Height="200";
						     oFCKeditor.ToolbarSet="Review";
						     oFCKeditor.Create();
						</script>
						<input type="hidden" id="id" name="articleid" value="<%=article.getId() %>"> 
						<input type="submit" value="提交" />
					</form>
                   </div>
               </div>
           </div>
           
           
           <div id="right">
               <div id="right_colum">
                   <div id="top">我的日记
                   </div>
                   
                   <div id="content">
                      <ul>
                         <li><a href="">生活</a></li>
                         <li><a href="">学习</a></li>
                         <li><a href="">工作</a></li>
                      </ul>
                   </div>
               </div>               
           </div>
       </div>
       
       <jsp:include page="../footer.jsp"></jsp:include>
    </div>
  </body>
</html>
